<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>Bajins</title>
    <link rel="icon" href="/images/icons/logo.png">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="description" content="Description">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
    <!-- Theme: Simple (latest v0.x.x) -->
    <!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css"> -->
    <!-- <link rel="stylesheet" href="//unpkg.com/docsify/themes/buble.css"> -->
    <!-- <link rel="stylesheet" href="//unpkg.com/docsify/themes/dark.css"> -->
    <!-- <link rel="stylesheet" href="//unpkg.com/docsify/themes/pure.css"> -->
    <!-- <link rel="stylesheet" href="//unpkg.com/docsify/themes/dolphin.css"> -->
    <link rel="stylesheet" href="//unpkg.com/gitalk/dist/gitalk.css">
    <link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
</head>

<body>
    <div id="app"></div>
    <script>
        window.$docsify = {
            el: '#app',
            name: 'Bajins',
            nameLink: '/UseNotes-docsify/',
            // 基础路径
            basePath: '/UseNotes-docsify/',
            // 路由模式与基础路径配合
            //routerMode: 'history',
            repo: 'https://github.com/woytu/UseNotes-docsify',
            loadNavbar: true,
            loadNavbar: 'nav.md',
            // loadSidebar: true,
            // subMaxLevel: 0,
            // loadSidebar: '../sidebar.md',
            // 小屏设备下合并导航栏到侧边栏。
            mergeNavbar: true,
            auto2top: true,
            //logo: '/images/icons/favicon-32x32.png',
            //themeColor: '#3F51B5',
            //autoHeader: true,
            formatUpdated: '{YYYY}/{MM}/{DD} {HH}:{mm}:{ss}',
            search: 'auto',
            // 完整配置参数
            search: {
                maxAge: 86400000, // 过期时间，单位毫秒，默认一天
                paths: 'auto', // or 'auto'
                placeholder: '搜索',
                // 支持本地化
                placeholder: {
                    '/': '搜索',
                },
                noData: '找不到结果!',
                // 支持本地化
                noData: {
                    '/': '找不到结果！',
                },
                // 搜索标题的最大程级, 1 - 6
                depth: 2
            },
            //disqus: 'bajins',
            //plugins: [
            //EditOnGithubPlugin.create(docBase, docEditBase, title)
            //],
            ga: 'UA-137200206-1',
            markdown: {
                // https://marked.js.org/#/USING_PRO.md#renderer
                renderer: {
                    image: function(href, title) {
                        return `<img src="${href}" data-origin="${href}" alt="${title}">`
                    }
                }
            },
            // https://docsify.js.org/#/zh-cn/write-a-plugin
            plugins: [
                // 如果需要用 docsify 的内部方法，可以通过 window.Docsify 获取，通过 vm 获取当前实例。
                function(hook, vm) {
                    // 初始化时调用，只调用一次，没有参数。
                    hook.init(function() {
                        // console.log("init");
                    })

                    // 初始化完成后调用，只调用一次，没有参数。
                    hook.mounted(function() {
                        // console.log("moubted");
                    })

                    // 每次开始解析 Markdown 内容时调用
                    hook.beforeEach(function(content) {
                        // console.log("beforeEach");
                        // let reg = new RegExp("/images", 'ig');
                        // return content.replace(reg, "../images");
                        return content;
                    })

                    // 解析成 html 后调用。beforeEach 和 afterEach 支持处理异步逻辑
                    hook.afterEach(function(html, next) {
                        // console.log("afterEach");
                        // let reg = new RegExp(`${vm.config.basePath}.*/images`, 'ig');
                        // html = html.replace(reg, `${vm.config.basePath}images`);
                        // 异步处理完成后调用 next(html) 返回结果
                        next(html);
                    })

                    // 每次路由切换时数据全部加载完成后调用，没有参数。
                    hook.doneEach(function() {
                        // console.log("doneEach");
                    })

                    // 初始化并第一次加载完成数据后调用，没有参数。
                    hook.ready(function() {
                        // console.log("ready");
                    })
                },
            ],
        }
    </script>
    <script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
    <script src="//unpkg.com/prismjs@1.16.0/prism.js"></script>
    <!-- 全文搜索 - Search -->
    <script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
    <!-- 谷歌统计 - Google Analytics -->
    <script src="//unpkg.com/docsify/lib/plugins/ga.js"></script>
    <!-- 默认是提供 emoji 解析的，能将类似 :100: 解析成 100 -->
    <script src="//unpkg.com/docsify/lib/plugins/emoji.js"></script>
    <!-- 在所有的代码块上添加一个简单的Click to copy按钮来允许用户从你的文档中轻易地复制代码。 -->
    <script src="//unpkg.com/docsify-copy-code"></script>
    <!-- docsify的分页导航插件 -->
    <script src="//unpkg.com/docsify-pagination/dist/docsify-pagination.min.js"></script>
    <!-- 在每一页上添加 Edit on github 按钮. -->
    <!-- <script src="//unpkg.com/docsify-edit-on-github/index.js"></script> -->

    <!-- Disqus评论系统支持。 https://disqus.com/ -->
    <!-- <script src="//unpkg.com/docsify/lib/plugins/disqus.min.js"></script> -->

    <!-- docsify-themeable (latest v0.x.x) -->
    <!-- <script src="https://cdn.jsdelivr.net/npm/docsify-themeable@0"></script> -->

    <!-- <script src="//unpkg.com/docsify/lib/plugins/gitalk.min.js"></script> -->
    <!-- <script src="//unpkg.com/gitalk/dist/gitalk.min.js"></script> -->

    <!-- <script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script> -->

    <script src='//unpkg.com/valine/dist/Valine.min.js'></script>

    <!-- 各评论系统 -->
    <script>
        // https://github.com/settings/applications/new 注册一个新的 OAuth Application

        //unpkg.com/docsify/lib/plugins/gitalk.min.js
        /*$docsify.plugins = [].concat(function (i) {
            var e = Docsify.dom;
            // 初始化完成后调用 ，只调用一次，没有参数。
            i.mounted(function (i) {
                var n = e.create("div");
                n.id = "gitalk-container";
                var t = e.getNode("#main");
                n.style = "width: " + t.clientWidth + "px; margin: 0 auto 20px;", e.appendTo(e.find(".content"),n);
            });
            // 每次路由切换时数据全部加载完成后调用，没有参数。
            i.doneEach(function (i) {
                for (var n = document.getElementById("gitalk-container"); n.hasChildNodes();) {
                    n.removeChild(n.firstChild)
                };
                gitalk.render("gitalk-container");
            })
        }, $docsify.plugins);
        const gitalk = new Gitalk({
            clientID: '40cfe11992c4ef076a4b',
            clientSecret: 'b43dc6b3740a306bec40c25c2db1ecc6c02e7716',
            repo: 'woytu.github.io',
            owner: 'woytu',
            admin: ['woytu'],
            // facebook-like distraction free mode
            distractionFreeMode: false
        });*/

        // https://imsun.net/posts/gitment-introduction/
        /*$docsify.plugins = [].concat(function (i) {
            var e = Docsify.dom;
            // 初始化完成后调用 ，只调用一次，没有参数。
            i.mounted(function (i) {
                var n = e.create("div");
                n.id = "gitment-container";
                var t = e.getNode("#main");
                n.style = "width: " + t.clientWidth + "px; margin: 0 auto 20px;", e.appendTo(e.find(".content"),n);
            });
            // 每次路由切换时数据全部加载完成后调用，没有参数。
            i.doneEach(function (i) {
                for (var n = document.getElementById("gitment-container"); n.hasChildNodes();) {
                    n.removeChild(n.firstChild)
                };
                gitment.render("gitment-container");
            });
        }, $docsify.plugins);
        var gitment = new Gitment({
            //id: '页面 ID', // 可选。默认为 location.href
            owner: 'woytu',
            repo: 'woytu.github.io',
            oauth: {
                client_id: '40cfe11992c4ef076a4b',
                client_secret: 'b43dc6b3740a306bec40c25c2db1ecc6c02e7716',
            },
        });*/

        // Valine https://valine.js.org/configuration.html
        $docsify.plugins = [].concat(function(hook, vm) {
            var e = Docsify.dom;
            // 初始化完成后调用 ，只调用一次，没有参数。
            hook.mounted(function(i) {
                var t = e.getNode("#main");
                var n = e.create("div");
                n.id = "vcomments";
                n.style = "width: " + t.clientWidth + "px; margin: 0 auto 20px;", e.appendTo(e.find(".content"), n);
            });
            // 每次路由切换时数据全部加载完成后调用，没有参数。
            // hook.doneEach(function (i) {
            //     for (var n = document.getElementById("vcomments"); n.hasChildNodes();) {
            //         n.removeChild(n.firstChild);
            //     }
            // });
        }, $docsify.plugins);
        new Valine({
            el: '#vcomments',
            appId: 'm9S5QXsdju39LvMs8ooRRIiF-MdYXbMMI',
            appKey: 'UfBRjySkb4bjPiFuH0Pxe3a9',
            placeholder: 'ヾﾉ≧∀≦)o来啊，快活啊!',
            notify: true, // 邮件提醒
            verify: false, // 验证码服务
            // 当前文章页路径，用于区分不同的文章页，以保证正确读取该文章页下的评论列表。
            path: window.location.href,
            visitor: true, // 文章访问量统计
            recordIP: true, // 是否记录评论者IP
        });

        // 来必力 https://www.livere.com
        /*$docsify.plugins = [].concat(function (hook, vm) {
            var e = Docsify.dom;
            // 初始化完成后调用 ，只调用一次，没有参数。
            hook.mounted(function (i) {
                var t = e.getNode("#main");
                var n = e.create("div");
                n.id = "lv-container";
                n.setAttribute("data-id", "city");
                n.setAttribute("data-uid", "MTAyMC80NTE3MC8yMTY4OA==");
                n.style = "width: " + t.clientWidth + "px; margin: 0 auto 20px;", e.appendTo(e.find(".content"), n);
            });
        }, $docsify.plugins);
        (function (d, s) {
            var j, e = d.getElementsByTagName(s)[0];

            if (typeof LivereTower === 'function') {
                return;
            }

            j = d.createElement(s);
            j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
            j.async = true;

            e.parentNode.insertBefore(j, e);
        })(document, 'script');*/
    </script>
</body>

</html>